package com.ptszyxx.popose.module.main.tea.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.ptszyxx.popose.R;
import com.ptszyxx.popose.databinding.ItemTeaBinding;
import com.ptszyxx.popose.module.main.tea.vm.TeaVM;
import com.ysg.http.data.entity.tea.TeaEntity;

public class TeaAdapter extends BaseQuickAdapter<TeaEntity, BaseDataBindingHolder<ItemTeaBinding>> {

    public TeaAdapter(TeaVM viewModel) {
        super(R.layout.item_tea);
    }

    @Override
    protected void convert(BaseDataBindingHolder<ItemTeaBinding> holder, TeaEntity item) {
        ItemTeaBinding binding = holder.getDataBinding();
        if (binding != null) {
            binding.setEntity(item);
//            binding.setViewModel(viewModel);
//            binding.setPresenter(mPresenter);
            binding.executePendingBindings();
        }
    }

    public static class Presenter{
//        public void onItemClick(FishVM viewModel, HomeResult entity){
//            viewModel.onItemClick(entity);
//        }
    }





}
